<?php
session_start();
include_once('includes/connexion_sql.php');


if (isset($_GET['go']))
{
    if(isset($_GET['id'])){$_GET['id'] = (int)$_GET['id'];}
    if($_GET['go'] == 'edit' AND isset($_POST['id'])){ include_once('module/notes/control/envoi.php'); }
    elseif($_GET['go'] == 'add'){ include_once('module/notes/control/envoi.php'); }

    else{include_once('module/notes/control/index.php'); }
}
elseif (isset($_GET['admin']))
{
    if(isset($_GET['id'])){$_GET['id'] = (int)$_GET['id'];}
    if($_GET['admin'] == 'edit' AND isset($_GET['id'])){ include_once('module/notes/control/edit.php'); }
    elseif($_GET['admin'] == 'delete' AND isset($_GET['id'])){ include_once('module/notes/control/envoi.php');}
    else{include_once('module/notes/control/index.php'); }
}
else
{
    include_once('module/notes/control/index.php');
}